package org.example.boot;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @Author: tang
 * @Description:
 * @Date 2025/7/22 10:21
 */
@Slf4j
//@Component
//@RocketMQMessageListener(topic = "test-topic",consumerGroup = "test-consumer")
public class ConsumerApp implements RocketMQListener<MessageExt> {
//    @Override
//    public void onMessage(String message) {
//        log.info("Consumer receive message: {}",message);
//    }

    @Override
    public void onMessage(MessageExt message) {
        log.info("Consumer receive message: {}",message);
    }

}
